<div class="layui-side layui-bg-black">
	<div class="layui-side-scroll">
		<#include "/apps/business/xiaoe/include/left.html">
	</div>
</div>
<div class="layui-body">
	<div class="layui-side-scroll">
		<div class="row" style="height:100%;">
			<div class="col-lg-12">
				<h1 class="site-h1 layui-tab" style="border-top:1px solid #e6e6e6;height:26px;">
					<span class="ukefu-bt">
						<i class="layui-icon ukewo-btn" style="font-size:20px;"></i>
						<div class="ukefu-bt-text">
							<div class="ukefu-bt-text-title">
							用户提问历史
							</div>
						</div>
					</span>
					<div class="ukefu-tab-title" >
						<ul class="tab-title">
							<li><a href="/apps/xiaoe/history.html">访客对话历史消息</a></li>
							<li><a href="/apps/xiaoe/history.html?tagget=all">已标记</a></li>
							<li><a href="/apps/xiaoe/history.html?tagget=1">标记正确</a></li>
							<li><a href="/apps/xiaoe/history.html?tagget=2">标记错误</a></li>
							<li><a href="/apps/xiaoe/history.html?correct=1">匹配正确</a></li>
							<li><a href="/apps/xiaoe/history.html?matchnum=0">无匹配问题列表</a></li>
							<li class="layui-this">测试内容</li>
						</ul>
					</div>
				</h1>
				<div class="row" style="padding:5px;">
				<div class="col-lg-12">
					<table class="layui-table" lay-skin="line">
					  <thead>
						<tr>
						  <th>对话内容</th>
						  <th>匹配知识库标题</th>
						  <th style="width:10%" nowrap>是否匹配知识库</th>
						  <th style="width:10%" nowrap>是否匹配正确</th>
						  <th style="width:5%" nowrap>匹配数量</th>
						  <th style="width:5%" nowrap>标记</th>
						  <th style="width:10%" nowrap>对话时间</th>
						</tr> 
					  </thead>
					  <tbody>
					  	<#if historyList?? && historyList.content??>
					  	<#list historyList.content as userinput>
						<tr>
						  <td class="ukefu_topic_title">
						  <span title="${(userinput.message!'')?no_esc}">
						   <#if (userinput.message?? && userinput.message?length>30)>${((userinput.message!'')?no_esc)?substring(0,30)}...<#else>${(userinput.message!'')?no_esc}</#if>
						  </span>
						  </td>
						  <td class="ukefu_topic_title">
					   		<span title="${(userinput.topictitle!'')?no_esc}">
						    <#if (userinput.topictitle?? && userinput.topictitle?length>30)>${((userinput.topictitle!'')?no_esc)?substring(0,30)}...<#else>${(userinput.topictitle!'')?no_esc}</#if>
						    </span>
						  </td>
						  <td><#if userinput.topic><i class="layui-icon" style="color: ${systemConfig.styleColor!'#32c24d'}">&#xe605;</i></#if></td>
					      <td><#if userinput.correct><i class="layui-icon" style="color: ${systemConfig.styleColor!'#32c24d'}">&#xe605;</i></#if></td>
						  <td>${userinput.matchnum!'0'}</td>
						  <td style="width:5%">
						  <#if userinput.tagget==1>正确<#elseif userinput.tagget==2>错误</#if>
						  </td>
						  <td  style="width:10%" nowrap>
								<#if userinput.createtime??>${userinput.createtime}</#if></td>
						  </td>
						</tr>
						</#list>
						</#if>
					  </tbody>
					</table>
				</div> 	   
			</div>
			<div class="row" style="padding:5px;">
				<div class="col-lg-12" id="page" style="text-align:center;"></div>
			</div>
			</div>	
		</div>
	</div>
</div>
<script>
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  
		  laypage.render({
				elem: 'page'
				,pages: <#if historyList??>${historyList.totalPages}<#else>0</#if> //总页数
				,curr:<#if historyList??>${historyList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						location.href = "/apps/xiaoe/history.html?<#if q??>q=${q?url}&</#if><#if curtype??>type=${curtype.id}&</#if>p="+data.curr ;
					}
				}
		   });
		});
</script>